home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / rexx / killall.avm < prev    next >
Text File  |  1995-03-09  |  2KB  |  71 lines

  1. /* to broadcast to everyone to quit */
  2.  
  3. call addlib("rexxsupport.library", 0, -30, 0)
  4.  
  5. /* Assume MAX of 10 AVMLOGVIEWs */
  6.  
  7. if showlist('p', 'AVMCALLNOTIFIER') then
  8.     address 'AVMCALLNOTIFIER' 'quit'
  9.  
  10. ports = upper(show('p'))
  11. numports = words(ports)
  12.  
  13. do i = 1 to numports
  14.           cport = word(ports, i)
  15.           if pos('AVMLOGVIEW', cport) > 0 then do
  16.             address value cport
  17.             'quit'
  18.           end
  19.  
  20.           if pos('AVMSCHEDULER', cport) > 0 then do
  21.             address value cport
  22.             'quit'
  23.           end
  24.  
  25.           if pos('AVMSCHEDULERVIEW', cport) > 0 then do
  26.             address value cport
  27.             'quit'
  28.           end
  29. end
  30.  
  31. if showlist('p', 'AVMPLAYER') then
  32.     address 'AVMPLAYER' 'quit'
  33.  
  34. if showlist('p', 'AVMPROGRAMMER') then
  35.     address 'AVMPROGRAMMER' 'quit'
  36.  
  37. if showlist('p', 'AVMSERVERCONFIG') then
  38.     address 'AVMSERVERCONFIG' 'quit'
  39.  
  40. if showlist('p', 'AVMSERVERMAN') then
  41.     address 'AVMSERVERMAN' 'quit'
  42.  
  43. if showlist('p', 'AVMLOGGER') then
  44.     address 'AVMLOGGER' 'quit'
  45.  
  46. if showlist('p', 'AVMCIDLOGGER') then
  47.     address 'AVMCIDLOGGER' 'quit'
  48.  
  49. if showlist('p', 'AVMFAXPRINTER') then
  50.     address 'AVMFAXPRINTER' 'quit'
  51.  
  52. do i = 1 to 10
  53.     a = 'AVMMAILBOXCONFIG.' || i
  54.     if showlist('p', a) then do
  55.         address value a
  56.         'quit'
  57.     end
  58. end
  59.  
  60. /* kill the active servers */
  61.  
  62. call open('servers', 'avm:servers.cfg', 'r')
  63. do while ~eof('servers')
  64.     line = readln('servers')
  65.     parse upper var line variable '=' value
  66.     if variable = 'PORT' then do
  67.         address value value
  68.         'quit'
  69.     end
  70. end
  71.